/*    */ package util;
/*    */ 
/*    */ import VO.ResultVO;
/*    */ import enums.CommonEnums;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class ResultVOUtil
/*    */ {
/*    */   public static ResultVO success(Object object) {
/* 15 */     ResultVO resultVO = new ResultVO();
/* 16 */     resultVO.setData(object);
/* 17 */     resultVO.setCode(Integer.valueOf(0));
/* 18 */     resultVO.setMsg("成功");
/* 19 */     return resultVO;
/*    */   }
/*    */ 
/*    */   
/* 23 */   public static ResultVO success() { return success(null); }
/*    */ 
/*    */   
/*    */   public static ResultVO failed(Integer code, String msg) {
/* 27 */     ResultVO resultVO = new ResultVO();
/* 28 */     resultVO.setCode(code);
/* 29 */     resultVO.setMsg(msg);
/* 30 */     return resultVO;
/*    */   }
/*    */   public static ResultVO failed(CommonEnums enum1) {
/* 33 */     ResultVO resultVO = new ResultVO();
/* 34 */     resultVO.setCode(enum1.getCode());
/* 35 */     resultVO.setMsg(enum1.getMessage());
/* 36 */     return resultVO;
/*    */   }
/*    */ }


/* Location:              /Users/frank/Desktop/iotlab/WEB-INF/classes/!/util/ResultVOUtil.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.0.7
 */